package com.xingda.packing.dmds.events.lister;

import com.google.common.eventbus.Subscribe;
import com.xingda.packing.dmds.events.dto.EventTriggerAlarmSaveDto;
import com.xingda.packing.dmds.minitor.service.IPkAlarmHistoryService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component("alarmDMDSLister")
public class AlarmLister {
    @Resource
    IPkAlarmHistoryService pkAlarmHistoryService;


    @Subscribe
    public void save(EventTriggerAlarmSaveDto eventTriggerAlarmSaveDto) {
        pkAlarmHistoryService.saveTriggerAlarm(eventTriggerAlarmSaveDto);
    }
}
